<template>
  <div class="container" @click="$router.push('/IndexShopDetail')">
    <div class="list01">
      <van-image style="display: block" fit="cover" :src="shop.goods_img" />
    </div>
    <div class="list02">
      <div class="title">{{ shop.goods_name }}</div>
      <div class="desc">
        <span>￥{{ shop.show_price }}</span>
        <span>已售{{ shop.sales_volume }}万件</span>
      </div>
    </div>
  </div>
  <van-divider style="margin: 0" />
</template>

<script setup lang="ts">
import '@/assets/css/reset.css'
import '@/assets/css/base.css'
import Shop from '@/types/Shop'

defineProps<{
  shop: Shop
}>()
</script>

<style scoped lang="scss">
.container {
  display: flex;
  flex-direction: row;
  margin: 0 !important;
  border-bottom: 1px solid #e2eeff;
  .list01 {
    width: calc(100% / 3);
  }
  .list02 {
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(100% * 2 / 3);
    .title {
      font-weight: var(--font-weight-one);
      font-size: var(--fontsize-two);
      font-family: Arial;
      color: var(--color-black);
    }
    .desc {
      display: flex;
      justify-content: space-between;
    }
  }
}
</style>
